package com.paziy.jan.graphics;

import com.paziy.jan.graphics.figures.Circle;
import com.paziy.jan.graphics.figures.Point;
import com.paziy.jan.graphics.figures.Rectangle;

public abstract class Graph {

    private static final Color DEFAULT_COLOR = new Color();

    private Color color = DEFAULT_COLOR;

    public Graph() {}

    public Graph(Color color) {
        this.color = color;
    }

    public Color getColor(){
        return color;
    }

    public void setColor(Color newColor) {
        color = newColor;
    }

    public abstract void draw();

    public static void swapXY(Movable object) {
        int y = object.getX();
        int x = object.getY();

        object.moveTo(x, y);
    }

}
